package com.homework.ch07.inner2;

public class Outer2 {
    private String name="这是外部类";
    public int age;
    public static int count=1;
    public static void hello()
    {
        System.out.println("hello,这是静态方法");
    }

    public String getName() {
        return name;
    }
    public static class inner2{
        public int age=19;
        public String name="这是内部类";
        public static String sname="这是静态变量";
        public static void helloinner()
        {
            System.out.println("这是内部静态方法");
        }
        public void hello2()
        {
            System.out.println(Outer2.count);
            Outer2.hello();
        }
    }
    public void print()
    {
        System.out.println(inner2.sname);
        inner2.helloinner();
        inner2 in2=new inner2();
        System.out.println(in2.age);
        System.out.println(in2.name);
    }
}
